<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'cms-form',
    'enableAjaxValidation' => false,
    'enableClientValidation' => true,
    'htmlOptions' => array(
        'class' => 'form-horizontal',
    ),
        ));
?>



<?php $language = MyFunctionCustom::getLanguage();  ?>

        <div class="row-fluid">
          <div class="span12">
              <!--PAGE CONTENT BEGINS-->
                <div class="control-group">
                    <label class="control-label"> Language</label>
                    <div class="controls">
                        <?php foreach($language as $key=> $lang) : ?>
                            <a class="btn btn-primary" href="<?php echo Yii::app()->createUrl('bookingsystem/cms/updatelang', array(
                                                                                                                                'language_id' => $key,
                                                                                                                                'page_type'=>$model->page_type
                                )); 
                            ?>">
                                <?php echo $lang; ?>
                            </a>
                        <?php endforeach;?>
                    </div>
                </div>
              <div class="control-group">
                      <?php echo $form->labelEx($model, "name", array('class' => 'control-label')); ?>
                  <div class="controls">
                      <?php echo $form->textField($model, "name", array('class' => 'span6', 'size' => 60, 'maxlength' => 255)); ?>
                      <span class="help-inline"><?php echo $form->error($model, 'name'); ?></span>
                  </div>
              </div>

              <div class="control-group" >
                  <?php echo $form->labelEx($model, 'description', array('class' => 'control-label')); ?>
                  <div class="controls">
                      <span class="help-inline"><?php echo $form->error($model, 'description'); ?></span>
                  </div>
              </div>       
                              <?php
                                  $this->widget('ext.editMe.ExtEditMe', array(
//                                                          'name' => 'Cms[description_'.$key .']',
                                      'height' => '250px',
                                      'width' => '100%',
                                      'model'=>$model,
                                      'attribute' => "description",
                                      'toolbar' => Yii::app()->params['ckeditor'],
                                      'filebrowserBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html',
                                      'filebrowserImageBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Images',
                                      'filebrowserFlashBrowseUrl' => Yii::app()->baseUrl . '/ckfinder/ckfinder.html?type=Flash',
                                      'filebrowserUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                                      'filebrowserImageUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                                      'filebrowserFlashUploadUrl' => Yii::app()->baseUrl . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
                                  ));
                              ?>   
              <div class="clear"></div>


              <div class="form-actions">
                  <button class="btn btn-info" type="submit">
                      <i class="icon-ok bigger-110"></i>
                      Submit
                  </button>
              </div>
              <!--PAGE CONTENT ENDS-->
          </div><!--/.span-->
      </div><!--/.row-fluid-->                      


<?php $this->endWidget(); ?>